/*编写程序，计算糖果总数。假设有一盒糖果，按照如下方式从中取糖果：$1$ 个 $1$ 个地取，正好取完。$2$ 个 $2$ 个地取，还剩 $1$ 个。$3$ 个 $3$ 个地取，正好取完。$4$ 个 $4$ 个地取，还剩 $1$ 个。$5$ 个 $5$ 个地取，还差 $1$ 个。$6$ 个 $6$ 个地取，还剩 $3$ 个。$7$ 个 $7$ 个地取，正好取完。$8$ 个 $8$ 个地取，还剩 $1$ 个。$9$ 个 $9$ 个地取，正好取完。请问：这个盒子里一共有多少个糖果？*/
# -*- coding: utf-8 -*-
"""
Spyder Editor

This is a temporary script file.
"""
i=9
while i>0:
  if i%2==1 and i%3==0 and i%4==1 and i%5==4 and i%6==3 and i%7==0 and i%8==1 and i%9==0:
   print("There are",i,"candies in this box.")
   break
  else:
    i = i+9